'use strict';

const Controller = require('egg').Controller;

class UserController extends Controller {
	async get() {
		const {
			ctx
		} = this;
		// let result = await this.app.mysql.get("user", {
		// 	id: 1
		// })
		ctx.body = 'hi, egg1';
	}
	async post() {
		const {
			ctx
		} = this;
		const userId = ctx.params.id;
		const userInfo = await ctx.service.user.find(userId);
		ctx.body = userInfo;
	}
}

module.exports = UserController;